Remove squeeze factor logic from HealthSystem#1662
Conversation
… since we removal squeeze factors
|
Three healthsystem tests failing:
The tests 2 & 3 look safe to remove. They're using the capabilities_coefficient to scale capabilities down to 0, leading to high squeeze factor, and therefore testing squeeze factors indirectly. They're both testing mode 1, so I think both these tests can be removed because we won't have squeeze factors for mode 1. However the first test, (FAO @marghe-molaro) |
|
Hi @tamuri,
TLOmodel/src/tlo/methods/healthsystem.py Lines 2068 to 2073 in c616315 Given that squeeze_factor == float('inf') is equivalent to saying that one of the required officers is missing, all we want to do is replace line 2072 with something like "if in mode 1 and one of the required officers has capabilities=0, ok_to_run = False". By doing this, we no longer rely on squeeze as proxy and hence test_which_hsi_can_run could be kept as is.
Please let me know if anything is unclear, happy to discuss over a call if easier.
|
|
Thanks! I think I understand. Perhaps we do some pair programming to box this off. Feels like it should be fairly straightforward. |
|
Hi @tamuri, just checking the best way to go about this - should I work on the tamuri/1661-remove-squeeze-factors branch directly, branch-off it, or create a completely new branch from master? And reminding us of things I need to add:
|
|
Thanks, Margherita. If this branch helps at all, feel free to continue on it. However works best for you. |
|
Hi @tamuri, Above issues now addressed in #1689. A few additional comments:
|
|
Closing in favour of #1781 |
|
Closing in favour of #1781 |
* Remove squeeze factor from HS * Ensure default logging for multiple treatment ids * Replaced rescaling of capabilities based on squeeze so that it is based on load * Ensure running footprint and load is clinic specific * Add clinics running footprint and test * For test to pass for now only log Capacity_By_FacID_and_Officer for GenericClinic * Style fixes * Fix test of squeeze logging * More logging fixes in test * Update comment in test because rescaling factor cannot be less than 1 * Consistent variable names * Remove redundant function log_current_capabilities_and_usage called log_clinic_current_capabilities_and_usage looping over the clinics. I have now removed log_clinic_current_capabilities_and_usage, and moved the looping logic to where the capabilities are logged. * Retrieve facility id and district from appointment type needs * Additional comments in tests to explain rationale I have updated comments in the test to explain the rationale for retaining an arbitrary clinic capabilities split in test set up. * WIP: looping over clinics to log * Debugging * All but one tests pass * WIP; debugging * Fix test rescaling capabilities based on load factors * Style fixes * Style fixes Signed-off-by: sangeetabhatia03 <[email protected]> * Remove print statements --------- Signed-off-by: sangeetabhatia03 <[email protected]> Co-authored-by: sangeetabhatia03 <[email protected]> Co-authored-by: Tim Hallett <[email protected]>

Towards completing #1661